home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / rwg.arc / RWG.ASC < prev   
Text File  |  1990-09-03  |  4KB  |  133 lines

  1.         RWG (Run When Good)   September 4, 1990
  2.  
  3.  
  4.                               RWG A Salt Batch File
  5.  
  6.         Written By:  David Postler
  7.  
  8.         Here  is a batch file that I find very helpful when running  SALT
  9.         scripts.   To  use you simply type:  rwg <file  name>  and  press
  10.         enter.   DO  NOT  enter the file extension.  The  file  will  the
  11.         standard  "SLT"  and "SLC" extensions.  The file first  calls  an
  12.         editor  for the script file.  After you exit the editor  it  will
  13.         try  to compile the script file.  It will store the results in  a
  14.         file  called RWG.ERR and then display the results on the  screen.
  15.         A  undocumented feature is that CS will give an  errorlevel  when
  16.         the  script does not compile.  If there is an error it will  give
  17.         the  option to break out of the batch file or to edit the  script
  18.         file again.  If your editor has options for opening more than one
  19.         file  at  a  time  you can look at the  RWG.ERR  file  to  remind
  20.         yourself  of the error.  If the file compiles without  errors  it
  21.         will  run Telix calling the script using the "s"  option.   After
  22.         exiting  Telix  you will have another chance to edit  the  script
  23.         file.   The batch file should be fairly self explanatory  as  rem
  24.         statements were used liberally.
  25.  
  26.                                       Notes
  27.         I have had some problems with Telix running the script as called.
  28.         After  rereading  the  manual  and  checking  I  cannot  see  any
  29.         problems, Suggestions?
  30.  
  31.         The editor called in this batch file is Wordstar 5.5.
  32.  
  33.         I also welcome any suggestions or comments and will try to answer
  34.         questions.   You  can  find  me on  the  FidoNet  Telix  echo  or
  35.         occasionally(once/month) on the Telix BBS.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                         1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.         RWG (Run When Good)   September 4, 1990
  68.  
  69.  
  70.         Here is the Batch file to enter:
  71.  
  72.         @echo off
  73.         rem file name rwg.bat
  74.         rem Public Domain written by David Postler  August 31, 1990
  75.         rem This program will run a Telix Script and when it compiles
  76.         rem without errors, it will run Telix with the script.
  77.         rem Written and tested on a Toshiba 1200HB and DOS 3.3
  78.         rem --------------------------------------------------------
  79.         rem if no file provided then print help info and quit
  80.         if not "%1"=="" goto :start
  81.         echo Enter RWG {filename} and no extension to run
  82.         goto :end
  83.         rem --------------------------------------------------------
  84.         :start
  85.         rem add your favorite editor command in the next line
  86.         ws %1.slt /n
  87.         rem compile script and store results in the file "rwg.err"
  88.         cs %1 > rwg.err
  89.         type rwg.err
  90.         if not errorlevel 1 goto :runtlx
  91.         echo If needed press ^C to abort batch file.
  92.         pause
  93.         goto start
  94.         rem --------------------------------------------------------
  95.         rem Delete the error file and Run Telix with the script
  96.         :runtlx
  97.         del rwg.err
  98.         telix  s%1.slc
  99.         rem --------------------------------------------------------
  100.         rem Reedit option
  101.         echo If needed press ^C to abort batch file.
  102.         echo Press any other key to edit again.
  103.         pause
  104.         goto :start
  105.         rem The file end for abort purposes
  106.         :end
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                         2
  128.  
  129.  
  130.  
  131.  
  132.  
  133.